package com.stars.services.impl.sysicons;
import com.github.pagehelper.PageInfo;
import com.stars.entity.sysicons.SysIconsEntity;
import com.stars.services.sysicons.SysIconsAccessServices;
import com.stars.dao.mapper.sysicons.SysIconsMapper;
import com.stars.entity.dto.sysicons.SysIconsDTO;

import java.util.List;
import com.stars.entity.ListPage;
import com.github.pagehelper.PageHelper;
import com.stars.services.impl.BaseAccessServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Title: 图标管理 业务逻辑
 * @author dj
 * @date 2019-10-18 22:36:24
 * @version V1.0
 *
 */
@Service
public class SysIconsAccessServicesImpl  extends BaseAccessServiceImpl<SysIconsMapper , SysIconsEntity> implements  SysIconsAccessServices {
    @Autowired
    private SysIconsMapper  sysIconsMapper;


    /**
     * 分页查询
     * @param pageNum 查询参数 起始页，大小。
     * @return
     */
    @Override
    public PageInfo<SysIconsDTO> pageList(Integer pageNum, Integer pageSize, SysIconsDTO dto) throws Exception{
        ListPage<SysIconsDTO> listPage = new ListPage<>(pageNum, pageSize, dto);
        PageHelper.startPage(pageNum, pageSize);
        List<SysIconsDTO> list = sysIconsMapper.pageQuerySysIcons(listPage);
        PageInfo<SysIconsDTO> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }
}
